/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kmcsoft.goldshop.model.exchange;

import com.kmcsoft.emaster.entity.TrackableEntity;
import java.util.ArrayList;
import java.util.List;
import javax.jdo.annotations.FetchGroup;
import javax.jdo.annotations.FetchGroups;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

/**
 *
 * @author kmcsoft02
 */
@PersistenceCapable(detachable = "true", table = "EXC_JewelryExchange")
@FetchGroups(value = {
    @FetchGroup(name = "detach_JewelryExchange_All", members = {
        @Persistent(name = "createdBy"),
        @Persistent(name = "jewelryDetails"),
        @Persistent(name = "diamondDetails")}),
    @FetchGroup(name = "detach_JewelryExchangeHistory_PremiumJewelryType", members = {
        @Persistent(name = "jewelryDetails")}),
    @FetchGroup(name = "detach_JewelryExchangeHistory_DiamondExchangeDetail", members = {
        @Persistent(name = "diamondDetails")})
})
public class JewelryExchange extends TrackableEntity {

    @Persistent
    private List<JewelryExchangeDetail> jewelryDetails;
    @Persistent
    private List<DiamondExchangeDetail> diamondDetails;
    @Persistent
    private boolean use;

    public JewelryExchange() {
        jewelryDetails = new ArrayList<JewelryExchangeDetail>();
        diamondDetails = new ArrayList<DiamondExchangeDetail>();
    }

    public List<DiamondExchangeDetail> getDiamondDetails() {
        return diamondDetails;
    }

    public void setDiamondDetails(List<DiamondExchangeDetail> diamondDetails) {
        this.diamondDetails = diamondDetails;
    }

    public List<JewelryExchangeDetail> getJewelryDetails() {
        return jewelryDetails;
    }

    public void setJewelryDetails(List<JewelryExchangeDetail> jewelryDetails) {
        this.jewelryDetails = jewelryDetails;
    }

    public boolean isUse() {
        return use;
    }

    public void setUse(boolean use) {
        this.use = use;
    }
}
